package com.jky.trial.mapper;

import com.jky.trial.entity.Record;
import com.jky.trial.entity.RecordExample;
import com.jky.trial.vo.RecordVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RecordMapper {
    long countByExample(RecordExample example);

    int deleteByExample(RecordExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Record record);

    int insertSelective(Record record);

    List<Record> selectByExample(RecordExample example);
    List<Record> selectBy(Record example);

    RecordVo selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Record record, @Param("example") RecordExample example);

    int updateByExample(@Param("record") Record record, @Param("example") RecordExample example);

    int updateByPrimaryKeySelective(Record record);

    int updateByPrimaryKey(Record record);

    List<RecordVo> pageList(RecordVo example);
    List<RecordVo> pageListWithTask(RecordVo example);

    /**
     * 设备出借日志
     *
     * @param example
     * @return
     */
    List<RecordVo> deviceRecord(RecordVo example);

    /**
     * 获取最大深度
     *
     * @param record.type
     * @param record.targetId
     * @return
     */
    Float selectMaxDeep(Record record);

}